package com.subsequent.mapper;

import com.subsequent.entity.Notice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface NoticeMapper {
    List<Notice> selectByCondition(@Param("title") String title,
                                   @Param("status") Integer status,
                                   @Param("startTime") String startTime,
                                   @Param("endTime") String endTime);

    int countByCondition(@Param("title") String title,
                         @Param("status") Integer status,
                         @Param("startTime") String startTime,
                         @Param("endTime") String endTime);

    Notice selectById(Integer noticeId);

    int insert(Notice notice);

    int update(Notice notice);

    int deleteById(Integer noticeId);
}